Configuring PLC within PLC-object

How to configure the →PLC resp. how to define which PLC should be used when loading your application:

  1. Open a PLC-object.

  2. In the opened editor for the PLC-object, search for the lines starting with CHANNEL and ending with END_CHANNEL:

    Syntax in case of communication with target system via TCP/IP
    {
        CHANNEL channel-name
            TCP
                ADDRESS := address;
                PORT := 1534;
            END_TCP
        END_CHANNEL
    } 
    Example for definitions in PLC-object "local"
    {
        CHANNEL LocalChannel
            TCP
                ADDRESS := 127.0.0.1;
                PORT    := 1534;
            END_TCP
        END_CHANNEL
    }

    After you have created a project, usually there are already some settings specified for the PLC within the existing PLC-object (information about the possible definitions are listed under "Errors while editing PLC-object in editor, Correct syntax for PLC-object"). 

  3. Replace the definition for the IP-address by the corresponding data for your PLC. 

  4. Search for the following line in the editor: 

    Syntax
    RESOURCE resource-name ON platform-name { ON_CHANNEL := channel-name }
    Example for definitions in PLC-object "local"
    RESOURCE local ON BuiltInPlc { ON_CHANNEL := LocalChannel }
  5. Make sure that in this line behind ON_CHANNEL the same name is entered as entered in CHANNEL ... END_CHANNEL
    When loading the application for the example, the PLC under IP-address 127.0.0.1 is addressed.

  6. If no platform is entered in the PLC-object, select one by using the content assist (in line RESOURCE ... behind ON). All available platforms are listed under "Available platforms".

  7. Save the PLC-object: menu File – Save

Available platforms

At present, the following platforms are available:

Platform

Use this platform, if you want to load the application on the following PLC.

entered within this existing PLC-object

BuiltInPlc

on the local computer

within local, if the project has been created by using a general project template
(e.g.  Neuron Power Engineer Project)

LinuxX86

on a Linux PC

WindowsX86

on a Windows PC

More platforms might be provided in your version.

 For instance, the following platforms are provided for the respective target system:

Platform

Use this platform, if you want to load the application on the following PLC.

entered within this existing PLC-object

ArduinoNanoV3 

on an →Arduino Nano

within arduinoNanoV3, if the project has been created by using a project template for Arduino Nano
(e.g. Neuron Power Engineer Project for Arduino Nano V3)

ControllinoMINI,
ControllinoMAXI,
ControllinoMEGA or
 ControllinoMAXIAutomation 

on a respective →Controllino

within controllinoMini, controllinoMaxi, controllinoMega or controllinoMaxiAutomation, if the project has been created by using the respective project template for Controllino
(e.g. Neuron Power Engineer Project for Controllino MINI)

RevolutionPi

on a →Revolution Pi

within RevolutionPi, if the project has been created by using a project template for Revolution Pi
(e.g. Neuron Power Engineer Project for Revolution Pi)

phyboardRegor

on a →phyBOARD-Regor

 

within phyBoardRegor, if the project has been created by using a project template for phyBOARD-Regor
(e.g. Neuron Power Engineer Project for phyBOARD-Regor)

phyboardWega

on a →phyBOARD-Wega

within phyBoardWega, if the project has been created by using a project template for phyBOARD-Wega
(e.g. Neuron Power Engineer Project for phyBOARD-Wega)

Raspbian

on a →Raspberry Pi

within raspberry, if the project has been created by using a project template for Raspberry Pi
(e.g. Neuron Power Engineer Project for Raspberry Pi)

Several PLC-configurations to quickly change the PLC-configuration

If you want to quickly address a different PLC when loading, you might want to consider providing several PLC-configurations.

How to provide several PLC-configurations

  1. In the PLC-object, copy all lines starting with { CHANNEL until END_CHANNEL  }.

  2. Paste the copied lines into the editor for the PLC-object, to be specific after the existing line } but before line CONFIGURATION configuration-name.

  3. In the pasted lines, enter a unique Channel name and adjust the copied definitions to the ones required for your PLC.
    Result: 2 PLC-configurations are available within the editor.

    Example
    {
        CHANNEL Channel1
            TCP
                ADDRESS := 127.0.0.1;
                PORT := 1534;
            END_TCP
        END_CHANNEL
    } 
     
    {
        CHANNEL Channel2
            TCP
                ADDRESS := 192.168.1.194;
                PORT := 1534;
            END_TCP
        END_CHANNEL
  4. Search for the following line in the editor: 

    Syntax
    RESOURCE resource-name ON platform-name { ON_CHANNEL := channel-name }
    Example
    RESOURCE local ON BuiltInPlc { ON_CHANNEL := Channel1 }
  5. Replace the entered Channel name (e.g. Channel1) by the Channel name previously entered (e.g. Channel2) so that the other PLC is being addressed when loading the application for local.

  6. Save the PLC-object: menu File – Save

If you want to address the other PLC when loading, you only have to change the name behind ON_CHANNEL in the editor for the PLC-object.